<template>
  <div>
    <h2 class="box3">库存</h2>
    <div class="chart3" ref="chart3" id="chart3"></div>
  </div>
</template>
<script>
import * as echarts from "echarts"
export default {
  mounted() {
    let mod = this.$refs['chart3'];
    let chart3 = echarts.init(mod);
    let option = {
      legend: {},
      series: {
        type: 'pie',
        data: [
          { value: 1048, name: '手机' },
          { value: 735, name: '键盘' },
          { value: 580, name: '平板' },
          { value: 300, name: '电脑' }
        ]


      }
    }
    chart3.setOption(option)
  }
}

</script>
<style lang="less">
.box3 {
  color: yellow;
  text-align: center;
}

.chart3 {
  height: 360px;
  background-color: yellow;
}
</style>